package cn.zcf.system.service.impl;

import cn.zcf.basic.utils.PageList;
import cn.zcf.system.domain.Permission;
import cn.zcf.system.mapper.PermissionMapper;
import cn.zcf.system.query.PermissionQuery;
import cn.zcf.system.service.IPermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class PermissionServiceImpl implements IPermissionService {

    @Autowired
    private PermissionMapper mapper;
    @Override
    public List<Permission> loadAll() {
        return mapper.loadAll();
    }

    @Override
    public Permission loadById(Long id) {
        return mapper.loadById(id);
    }



    @Override
    public PageList<Permission> pageQuery(PermissionQuery query) {
        return new PageList<Permission>(mapper.queryCount(query),mapper.queryData(query));
    }
}
